<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td><h1>报修审核</h1></td>
		<td class="actions">
			<table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
				<tr>
                	<td <?=$this->view_act ?>><a href="?app=baoxiu&mod=audit">未审核列表</a></td>
					<td <?=$this->post_act ?>><a href="#">报修审核</a></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<?php if($this->opt=='view'): ?>
<div class="t_2">
     <div class="fl">报修信息列表</div>
     <div class="fr add_form"></div>
</div>
<div class="search">
    <form id='search'>
        <span>
            客户名称:<input type="text" name="customname" id="customname" value="" />
        </span>
        <span><input type="submit" value="搜索" /><?php echo showhide(array('app'=>APP,'mod'=>MOD)); ?></span>
    </form>
</div>
<div class="line_1"></div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table1">
       <tr>
            <th class="th0" rel="bid">编号</th>
            <th class="th0">客户</th>
            <th class="th0">标题</th>
            <th class="th1" rel="">发布时间</th>
            <th class="th0">操作</a>
       </tr>
       <?php foreach((array)$this->lists as $list): ?> 
       <tr>
            <td><?php echo $list['bid']; ?></td>
            <td><?php echo $list['customer_name']; ?></td>
            <td><?php echo $list['title']; ?></td>
            <td><?php echo date('Y-m-d H:i:s',$list['created_time']); ?></td>
            <td>
            	<?=opt('view','?app='.APP.'&mod=audit&opt=post&bid='.$list['bid'], ' title ="审核" '); ?>
            </td>
       </tr>
       <?php endforeach; ?>
</table>
<div class="page_num">
     <div class="fl">
        <span></span>
     </div>
     <div class="fr">
        <p class="cpager">
            <?php echo $this->pager; ?>
        </p>
     </div>
</div>
<?php elseif($this->opt=='post'): ?>
	<div class="edit_tab tab">
<div class="bg1">
<div class="bg2">
      <span rel="info" class="span_now">查看报修信息</span>
</div>
</div>
</div>
<div >
</div>
<div class="post_form" id="info_form">
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
    	<tr>
			<td class="td1">审批状态：</td>
			<td><span><?=$this->state?></span></td>
		</tr>
        <tr>
			<td class="td1">客户：</td>
			<td><span><?=$this->baoxiu['customer_name']?></span></td>
		</tr>
		<tr>
			<td class="td1">标题：</td>
			<td><span><?=$this->baoxiu['title']?></span></td>
		</tr>
		<tr>
			<td class="td1">内容：</td>
			<td>
            	<?=$this->baoxiu['content']?>
            </td>
		</tr>
        <tr>
			<td class="td1">信息反馈：</td>
			<td>
           	<?=$this->baoxiu['mark']?>
            </td>
		</tr>
     </table>
</div>
<form id="xxx">
    <div class="t_2">
         <div class="fl">操作</div>
         <div class="fr add_form"><a href="javascript:;" id="add_table"></a></div>
    </div>
	<div class="order_show" id="info_form">
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		 <tr>
			<td class="td1">信息反馈：</td>
			<td>
            <textarea id="mark" name="mark"></textarea>
            </td>
		</tr>
        <tr>
			<td class="td1">操作：</td>
			<td><input type="submit" id="audit" value="审核通过"/>
            <input type="hidden" id="bid" name="bid" value="<?php echo $this->baoxiu['bid']; ?>"/>
            </td>
		</tr>
     </table>
	</div>
</form>
<script>
$(function(){
	$('#xxx').submit(function(){
		$.post(location.href,$(this).serialize(),function(data){
			alert(data.message);
			if (data.state > 0)
			{
				location.href = "?app=baoxiu&mod=audit";
			}
			
		},'json');
		return false;
	});
});
</script>
<?php endif; ?>